﻿using Microsoft.TeamFoundation.VersionControl.Client;

namespace TfsGiggle.Core
{
    /// <summary>
    /// VersionControlServer interface
    /// </summary>
    public interface IVersionControlServer
    {
        /// <summary>
        /// Does the item exist
        /// </summary>
        /// <param name="path"></param>
        /// <param name="itemType"></param>
        /// <returns></returns>
        bool ServerItemExists(string path, ItemType itemType);

        /// <summary>
        /// get the item
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        IItem GetItem(string path);

        /// <summary>
        /// Get the changeset
        /// </summary>
        /// <param name="changesetId"></param>
        /// <param name="includeChanges"></param>
        /// <param name="includeDownloadInfo"></param>
        /// <returns></returns>
        IChangeset GetChangeset(int changesetId, bool includeChanges, bool includeDownloadInfo);

        /// <summary>
        /// Return history
        /// </summary>
        /// <param name="path"></param>
        /// <param name="versionSpec"></param>
        /// <param name="deletionId"></param>
        /// <param name="recursion"></param>
        /// <param name="user"></param>
        /// <param name="versionFrom"></param>
        /// <param name="versionTo"></param>
        /// <param name="maxCount"></param>
        /// <param name="includeChanges"></param>
        /// <param name="slotMode"></param>
        /// <returns></returns>
        IChangeset[] QueryHistory(string path, VersionSpec versionSpec, int deletionId, RecursionType recursion, string user, VersionSpec versionFrom, VersionSpec versionTo, int maxCount, bool includeChanges, bool slotMode);
    }
}
